home *** CD-ROM | disk | FTP | other *** search
- LILO configuration (LInux LOader)
- Introduction
-
- 11.. PPuurrppoossee
-
- _L_i_n_u_x may boot using different mechanisms. Booting involve mainly
- reading and bringing a kernel file (often called zImage or vmlinuz) in
- memory, then laughing it. While this sounds all simple, there is
- always some quirks around. This is why booting an Operating System is
- some sort of black art. Unlike many boot loader shipped with some
- other commercial OSs, _L_I_L_O is fully documented and probably the most
- versatile loader ... by far.
-
- We will first try to describe what's involved and then what you can do
- with all that.
-
- 22.. LLIILLOO pprriinncciipplleess
-
- Without entering too deep, lets just explain what booting a PC is all
- about.
-
- 22..11.. TThhee ffiirrsstt iinnhhaabbiittaanntt:: TThhee BBIIOOSS
-
- When a _P_C starts, the first program to take control is the _B_I_O_S which
- is resident in _R_O_M. After initializing most hardware in your machine,
- it will attempt to load a tiny program, either from the first sector
- of the floppy or the first sector of the first hard drive. This
- program is called the _M_a_s_t_e_r _B_o_o_t _R_e_c_o_r_d or _M_B_R for short.
-
- 22..22.. FFrroomm tthhee _M_B_R ooff tthhee hhaarrdd ddrriivvee ttoo tthhee _O_S
-
- The _M_B_R of the hard drive will locate the active partition and again,
- will load the first sector of that partition. This sector contain a
- tiny little program which knows a little bit more about the internals
- of the _O_S living in that partition. It will proceed to load either
- basic components of the system or simply a more sophisticated boot
- loader which will finish the job.
-
- 22..33.. TThhee ffllooppppyy''ss bboooott sseeccttoorr
-
- The boot sector of a floppy may be compared to the boot sector of the
- active partition. It will proceed to load the OS living on the floppy.
-
- 22..44.. AAnndd LLIILLOO
-
- _L_I_L_O is fairly flexible, here is why
-
- ╖ It can be installed either as a replacement for the _M_B_R or as a
- boot sector, and still boot _L_i_n_u_x or most other OS on any drives in
- any partitions.
-
- ╖ It can be installed on the boot sector of the floppy and still
- perform its normal task, booting almost anything on the hard
- drive(s).
-
- ╖ Beside the boot sector, it has no hidden file, nor use any special
- partition. Further, its configuration files can be installed in any
- partition, even unrelated to _L_i_n_u_x, even in a subdirectory of a _D_O_S
- partition.
-
- ╖ It can boot several different kernel configuration and even several
- different kernels.
-
- ╖ It can boot more than one _L_i_n_u_x installation.
-
- ╖ It can boot linux on any drive.
-
- 22..55.. LLIILLOO,, LLiinnuuxx aanndd tthhee wwoorrlldd
-
- When installing _L_i_n_u_x on a system with several OS (other than _L_i_n_u_x),
- take this as a rule of thumb. Manage to install and boot all the other
- OSs first. They are less flexible. _L_i_n_u_x will always find it way.
-
- 33.. _L_I_L_O ccoonnffiigguurraattiioonn ddiiaalloogg
-
- Now that you know a little bit what _L_I_L_O can do, let see how you can
- configure it using _L_i_n_u_x_c_o_n_f. The main configuration dialog is split
- in sections. Here is an introduction to each.
-
- 33..11.. GGlloobbaall ffeeaattuurreess
-
- This section deal with how to install _L_I_L_O.
-
- 33..11..11.. DDiissaabblliinngg _L_I_L_O
-
- If you boot your _L_i_n_u_x system without _L_I_L_O, you may find _L_i_n_u_x_c_o_n_f
- behavior a little bit annoying as it try to make sure _L_I_L_O is properly
- setup-ed all the time. You can disable _L_I_L_O support from _L_i_n_u_x_c_o_n_f
- anytime. This only affect _L_i_n_u_x_c_o_n_f though. This does nothing else. It
- won't UN-install _L_I_L_O. It just say to _L_i_n_u_x_c_o_n_f
-
- "stop checking lilo".
-
- 33..11..22.. IInnssttaallll bboooott sseeccttoorr oonn
-
- _L_I_L_O is brought to life by firing a tiny tiny program. This program
- must be installed in a strategic location. The pop-up list of this
- field offers you a list of valid choice is order of preference. If
- _L_i_n_u_x is the aaccttiivvee partition it does not matter much. If it is not,
- or your _L_i_n_u_x partition is not on the first hard drive, you must
- install it on either the master boot record of the first drive, or on
- a boot floppy.
-
- Note that installing the boot sector on a boot floppy is still pretty
- fast as only one sector is read from it. All other files still lives
- in the _L_i_n_u_x partition.
-
- 33..11..33.. BBiiooss bboooott mmooddee
-
- Known to boot faster. Known not to work on some machines. I have no
- experience with it.
-
- 33..11..44.. BBoooott ddeellaayy
-
- _L_I_L_O may boot right away or wait for some time, allowing you to
- intercept the boot sequence. From there you can
-
- ╖ Boot a different OS or a different configuration.
-
- ╖ Pass some boot time parameter to the kernel.
-
- By pressing the SSHHIIFFTT and TTAABB keys at the same time the boot delay is
- disable and ""bboooott::"" prompt will appear.
-
- A value of 50 is recommended.
-
- 33..11..55.. MMeessssaaggee ffiillee
-
- You must put the path of a text file. Ideally, the text will be short
- and will fill the screen, leaving the _L_I_L_O prompt at the bottom. This
- is used for the boot floppies of some distributions.
-
- 33..22.. DDeeffaauullttss
-
- This section provide the default configuration applying the to
- different _L_i_n_u_x configuration following. Entering information here
- avoid repeating it later.
-
- 33..22..11.. RRoooott ppaarrttiittiioonn
-
- You must tell where your _L_i_n_u_x root partition is sitting. A pop-up
- list gives you a list of all partitions.
-
- 33..22..22.. RRaamm ddiisskk ssiizzee
-
- Ram disk are used for installation boot disks. They are seldom used
- for full configuration. Recent development of kernel modules have made
- ram disk runtime configurable. A value of 0 disable the ram disk
- feature.
-
- 33..22..33.. BBoooott mmooddee
-
- Normally this flags is on. For _U_M_S_D_O_S installation, it is off. _U_M_S_D_O_S
- installation will generally use _l_o_a_d_l_i_n to boot instead of _L_I_L_O
- anyway.
-
- Unless you really what your doing, then left it to on. Here is why.
- When _L_i_n_u_x boots, in read-only mode, it is allowed to do much
- inspection of the partitions without touching them at all. This is
- good especially if the boot follows a crash which has left the
- partitions in a weird state.
-
- Why all the fuss about not touching the partition ? Well, _L_i_n_u_x
- support multiple time stamps per file. One is the "last access date".
- This means that the file system is changed (data is written to the
- disk) just by reading files (which is exactly what happen at boot
- time).
-
- This last access time stamp is pretty useful both becomes a nuisance
- at boot time. The "read only" tells _L_i_n_u_x to drop this behavior.
-
- After the partition has been checked, the system will set back to
- "read write" mode automatically.
-
- 33..22..44.. BBoooott ooppttiioonnss
-
- Some drivers required some information to correctly initialized
- themselves. For example, _L_i_n_u_x is probing only for one Ethernet
- adaptor. If you have two, you can write in this field
-
- ether=11,0x300,eth1
-
- This will tell _L_i_n_u_x to check for a second adapter (the first being
- eth0) at IIRRQQ 11 and IIOO 300 hex.
-
- There is a complete document about boot time configuration. Note that
- the forthcoming _L_i_n_u_x 1.4 will dramatically changed this has run time
- modules will make a widespread appearance.
-
- The document can be found at ______________.
-
- 33..33.. LLiinnuuxx sseettuuppss
-
- The default section is followed by several identical sections. Each
- defines one _L_i_n_u_x boot configuration. Each boot configuration repeats
- all the parameter of the default section. You can simply override them
- here.
-
- The first configuration will be the default one. This means that _L_I_L_O
- will boot this one unless told differently (Using SHIFT TAB to stop
- the boot process...).
-
- Only 3 fields differ from the default section.
-
- 33..33..11.. DDeelleettee tthhiiss ccoonnffiigguurraattiioonn
-
- If you check this box, the configuration will disappear when you will
- hit the aacccceepptt button.
-
- 33..33..22.. KKeerrnneell iimmaaggee ffiillee
-
- This is the path of the kernel file which will boot for this
- configuration. Note that one kernel file may participate to several
- configurations.
-
- 33..33..33.. LLaabbeell
-
- This is a short name identifying uniquely the configuration. Given
- that a kernel file may be shared by several configuration, we need a
- unique key. This will be used when intercepting the boot process. _L_I_L_O
- expect simply a label name and will boot the corresponding
- configuration.
-
- 33..44.. OOtthheerr ooppeerraattiinngg ssyysstteemm
-
- _L_I_L_O is able to boot almost anything. For each OOSS you want to boot,
- simply specify the partition and a label. _L_I_L_O simply load the boot
- sector of that partition and launch it.
-
- 44.. MMoovviinngg _L_I_L_O ccoonnffiigguurraattiioonn ffiilleess
-
- Sometime, one must play with _L_i_l_O's configuration file. The good news
- is that, first, they are movable, the the next good news is that you
- can tell Linuxconf about it. Just go to the "List all configuration
- files" menu, scroll to the //eettcc//lliilloo..ccoonnff line and select the eeddiitt
- button. Enter the new path of the _L_I_L_O configuration file. Be aware
- that _L_I_L_O expect to find its configuration file in /etc/lilo.conf.
- When moving the file, it has to go to a subdirectory holding a eettcc
- subdirectory in which you will place the file lliilloo..ccoonnff.
-
- 44..11.. WWhhyy mmoovviinngg _L_I_L_O aannyywwaayy ??
-
- There are different reason why one would want to do this. Here are
- some.
-
- ╖ Your hard drive has more that 1024 cylinders and the root partition
- goes beyond. _L_I_L_O uses the BIOS to load the kernel files (among
- other things). If the kernel file lies above the 1024 cylinder
- limit, _L_I_L_O won't be able to boot properly. In fact, LILO will tell
- you right away at install time.
-
- ╖ You root partition is located on the third or fourth hard drive and
- your BIOS (again) is too old and does not know about this second
- IDE channel. In this case, LILO will warn you at install time that
- some BIOS can't access the drive. At boot time you will get a bunch
- of errors.
-
- 44..22.. HHooww ttoo mmoovvee ?? WWhheerree ??
-
- On a machine dedicated to Linux, where you have a large drive with
- more than 1024 cylinder, many people will create a smaller partition
- for the basic OS and a larger for the data, insuring that all LILO
- file fits under the 1024 cylinder limit.
-
- This is often annoying as it makes management more complex. You end
- up with two partition partly filled.
-
- Another solution is to create a very small partition (few megs) at the
- beginning of the disk and reserve that for _L_I_L_O configuration and
- kernel files. This way you can create a single large root partition
- which is nicer to manage.
-
- (one can argue that creating a single large partition is a bad idea as
- it puts all the eggs in the same bag. Given the design of the EEXXTT22
- file system which distribute management information all over the
- partition, with replication, I doubt this apply anymore).
-
- So you have a partition which fits the bill. It is all accessible from
- the BIOS. Here are the steps to follow. Suppose this partition in
- mount under the lliilloo directory and you want to put all configuration
- files in the root of this partition.
-
- ╖ mkdir /lilo/etc
-
- ╖ cp /etc/lilo.conf /lilo/etc/lilo.conf
-
- ╖ mkdir /lilo/boot
-
- ╖ cp /boot/* /lilo/boot
-
- ╖ cd /
-
- ╖ tar cf - dev | (cd /lilo && tar xvf -)
-
- ╖ cp /vmlinuz /lilo
-
- You can activate this moved configuration like this
-
- /sbin/lilo -r /lilo
-
- And you can do this with Linuxconf by telling the //eettcc//lliilloo..ccoonnff is
- now //lliilloo//eettcc//lliilloo..ccoonnff. From now on, using Linuxconf, this should be
- completely invisible to you or whoever manage your machine.
-
- 55.. AAlltteerrnnaattiivveess ttoo LLIILLOO
-
- _L_i_n_u_x can be boot from a plain floppy or using loadlin. All this is
- unrelated to _L_I_L_O but it is good to know about it. Assuming your
- _L_i_n_u_x root partition is /dev/hdaX...
-
- 55..11.. UUssiinngg aa ffllooppppyy
-
- To create a simple boot floppy, just to this
-
- ╖ cp zImage /dev/fd0
-
- ╖ rdev /dev/fd0 /dev/hdaX
-
- ╖ rdev -R /dev/fd0 1
-
- 55..22.. UUssiinngg llooaaddlliinn
-
- To boot with loadlin (A _D_O_S program), just copy the kernel file to
- your _D_O_S partition and type, at the _D_O_S prompt:
-
- loadlin zimage root=/dev/hdaX ro
-
-